package com.nut.controller;

import org.springframework.security.access.annotation.Secured;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @ author : HyoJoo-W
 * @ createDate : 2021-05-09 14:54
 * @ Description : 登录controller
 */

@Controller
public class LoginController
{
    //@Secured("ROLE_abc")
    @PreAuthorize("hasRole('abc')")
    @RequestMapping("/toMain")
    public String toMain()
    {
        return "redirect:main.html";
    }

    @RequestMapping("/toError")
    public String toError()
    {
        return "redirect:error.html";
    }
}
